Let route simplifier know if it's working on tracks or routes so it knows which list...
authorrobertl <robertl>
Mon, 2 Jul 2007 02:06:31 +0000 (02:06 +0000)
committerrobertl <robertl>
Mon, 2 Jul 2007 02:06:31 +0000 (02:06 +0000)
smplrout.c

index f3088766c26486345fac435d5a5ad48f242ed396..ec370aaa6a007db54870a7d46791e96c0e15a0b8 100644 (file)
@@ -65,6 +65,7 @@ static char *countopt = NULL;
 static char *erroropt = NULL;
 static char *xteopt = NULL;
 static char *lenopt = NULL;
+void (*waypt_del_fnp) (route_head *rte, waypoint *wpt);
 
 static
 arglist_t routesimple_args[] = {
@@ -269,7 +270,7 @@ routesimple_tail( const route_head *rte )
                                totalerror += xte_recs[i].distance;
                        }
                }
-               route_del_wpt( (route_head *)(void *)rte,
+               (*waypt_del_fnp)( (route_head *)(void *)rte,
                                (waypoint *)(void *)(xte_recs[i].intermed->wpt));
                waypt_free((waypoint *)(void *)(xte_recs[i].intermed->wpt));
                
@@ -299,7 +300,10 @@ routesimple_tail( const route_head *rte )
 void 
 routesimple_process( void ) 
 {
+       waypt_del_fnp = route_del_wpt;
        route_disp_all( routesimple_head, routesimple_tail, routesimple_waypt_pr );
+
+       waypt_del_fnp = track_del_wpt;
        track_disp_all( routesimple_head, routesimple_tail, routesimple_waypt_pr );
 }